/* Default Light Mode */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    transition: background 0.4s, color 0.4s;
    height: 80vh;
    display: grid;
    place-items: center;
}

/* Wrapper for Dark Mode Effect */
.theme-wrapper {
    transition: background 0.4s, color 0.4s;
    width: 90%;
    height: 90%;
}

/* Content Box */
.content {
    text-align: center;
    background: #f8f9fa;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #222;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.4s, color 0.4s;
}

/* Hide Checkbox */
input[type="checkbox"] {
    display: none;
}

/* ✅ Apply Dark Mode (Fixes Background Color Issue) */
input[type="checkbox"]:checked ~ .theme-wrapper {
    background: #222; /* Dark Mode Background */
    color: #fff;
}

input[type="checkbox"]:checked ~  .content {
    background: #333; /* Dark Mode for Content */
    color: white;
}

/* Toggle Switch Styling */
.toggle {
    display: inline-block;
    width: 50px;
    height: 25px;
    background-color: #ddd;
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    transition: background 0.4s;
    margin-bottom: 20px;
}

.toggle::before {
    content: "";
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2.5px;
    left: 3px;
    transition: transform 0.4s;
}

/* Move the toggle when checked */
input[type="checkbox"]:checked + .toggle {
    background-color: #444;
}

input[type="checkbox"]:checked + .toggle::before {
    transform: translateX(25px);
}
